var config = {
    /**
     * 增删改查，api地址
     * @total 获取总条数api
     * @get   获取数据api
     * @edit  修改数据api
     *
     * model        类名
     * action       方法名 
     */
    set_url: {
        "total": { model: "goods", action: "get_goods_total" },
        "get": { model: "goods", action: "get_goods_all" },
        "edit": { model: "goods", action: "on_goods_edit" }
    },

    /**
     * 筛选配置
     * @type {Array}
     */
    select: [
        [{
            label: "盘点时间",
            type: "daterange",
            field: "inventory_date",
            span: 8,
            range: "-",
            start: "开始时间",
            end: "结束时间"
        }, {
            label: "仓库",
            type: "select",
            field: "warehouse",
            placeholder: "选则仓库",
            span: 6,
            option: [{
                value: 1,
                label: '全部仓库'
            }, {
                value: 2,
                label: "一号仓库"
            }, {
                value: 3,
                label: "二号仓库"
            }]
        }],
        [{
            label: "商品类别",
            type: "select",
            field: "type",
            placeholder: "选择类别",
            span: 6,
            option: [{
                value: 1,
                label: '夏季'
            }, {
                value: 2,
                label: "冬季"
            }]
        }, {
            label: "商品",
            type: "input",
            field: "date",
            placeholder: "请选择日期",
            span: 6
        }]
    ],

    /**
     * 表格配置
     */
    selection: false,
    model: "input",
    table: [{
        label: '操作',
        type: 'action',
        field: 'action',
        labelWidth: 80,
        sortable: false,
        option: [{
            label: "修改",
            callback: {
                type: 'target',
                path: "/empty"
            },
            type: "primary",
            icon: "",
        }, {
            label: "删除",
            callback: {
                type: 'message',
                url: ['goods', 'on_goods_delete'],
                params: ['goods_id'],
                config: {
                    type: 'warning',
                    title: '系统提示',
                    content: '此操作将永久删除删除文件不可恢复，是否继续！',
                    confirm: '继续',
                    cancel: '取消',
                    confirmTips: {
                        type: 'success',
                        message: '删除成功！',
                    },
                    cancelTips: {
                        type: 'info',
                        message: '您取消了删除！',
                    }
                }
            },
            type: "primary",
            icon: "",
        }]
    }, {
        label: "盘点时间",
        type: "input",
        field: "inventory_date",
        labelWidth: 100,
        sortable: false,
        amend: false,
    }, {
        label: "盘点编号",
        type: "input",
        field: "inventory_sn",
        labelWidth: 140,
        sortable: false,
        amend: false,
    }, {
        label: "盘点仓库",
        type: "input",
        field: "inventory_warehouse",
        labelWidth: 100,
        sortable: false,
        amend: false,
    }, {
        label: "盘点结果",
        type: "input",
        field: "inventory_res",
        labelWidth: 210,
        sortable: false,
        amend: false,
    }],

    /**
     * 分页配置
     */
    page: {
        size: 10,
        current: 1,
        total: 100
    }
}
export default config;